package com.fire.eyes.validation;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.xmlbeans.impl.xb.xmlconfig.Extensionconfig;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @ClassName: TokenDTO
 * @Description: TODO
 * @Author raoyuxing
 * @Date 2019/1/10 10:03
 */
@Setter
@Getter
@NoArgsConstructor
public class TokenDTO {

    @NotNull(groups = {paging.class})
    @Min(value = 0,groups = {paging.class})
    private Integer page;

    @NotNull(groups = {paging.class})
    @Min(value = 0,groups = {paging.class})
    private Integer pagesize;

    /*@NotBlank(message = "token不能为空")      暂时不校验token*/
    private String token;

    /**
     * 功能描述: 校验分组类，用于分页
     * @auther: raoyuxing
     * @date: 2019/1/18 11:18
     */
    public interface paging {}

    @Override
    public String toString() {
        return ReflectionToStringBuilder.toString(this);
    }

}
